function alertTips(content) {
    alert(content)
}

function checkIsNull(value) {
    return value == "" || value == undefined || value == null;
}

function checkIsNotNull(value) {
    return value != "" && value != undefined && value != null;
}

//获取时间戳
function getTimestamp() {
    return "img_"+new Date().getTime();
}

//根据值删除Array元素
Array.prototype.removeByValue = function(val) {
    for(var i=0; i<this.length; i++) {
        if(this[i] == val) {
            this.splice(i, 1);
            break;
        }
    }
};

//清除空的Array
function ClearNullArr(arr){
    for(var i=0,len=arr.length;i<len;i++){
        if(!arr[i]||arr[i]==''||arr[i] === undefined){
            arr.splice(i,1);
            len--;
            i--;
        }
    }
    return arr;
};

function getNowFormatDate() {
    var date = new Date();
    var seperator1 = "-";
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    if (month >= 1 && month <= 9) {
        month = "0" + month;
    }
    if (strDate >= 0 && strDate <= 9) {
        strDate = "0" + strDate;
    }
    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
    return currentdate;
}

function getNowFormatDateTime() {
    var date = new Date();
    var seperator1 = "-";
    var seperator2 = ":";
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    if (month >= 1 && month <= 9) {
        month = "0" + month;
    }
    if (strDate >= 0 && strDate <= 9) {
        strDate = "0" + strDate;
    }
    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
        + " " + date.getHours() + seperator2 + date.getMinutes()
        + seperator2 + date.getSeconds();
    return currentdate;
}

